import Vue from 'vue'
import Vuex from 'vuex'
import VuexPersistence from 'vuex-persist'
const vuexLocal = new VuexPersistence({
    storage: window.localStorage
})
Vue.use(Vuex)

export default new Vuex.Store({
  state: {
      userInfo:{},
      isAffair:false

  },
  mutations: {
      setUserInfo(state,data){
          state.userInfo = data;
      },
      setisAffair (state, data) {
          state.isAffair = data
      }

  },
  actions: {

  },
    plugins: [vuexLocal.plugin]
})
